{extend name="public:layout" /}

{block name="title"}
	<title>{:site('siteName')}-首页</title>
{/block}

{block name="css"}
	<style type="text/css">
		.content { padding-top: 0; }
		.banner { position: relative; overflow: auto; margin-top: -14px; }
	    .banner li { list-style: none; width: 100%;}
	    .banner ul li { float: left; }
	    .banner ul li img { width: 100%; }
	    .banner .tb-arrow a.prev { left: 5%; }
	    .article { margin: 15px 0; }
	    .article div { margin: 0 6px; height: 385px; border: 1px solid #eee; width: 32%; float: left; }
	    .article-table th{ color: #a6aeb3; }
	    .article-table .left { text-align: left; padding-left: 10px;}
	    .article-table .size { font-size: 18px; }
	    .article-table .hide { width: 232px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis; }
	</style>
{/block}

{block name="content"}
	
	<div class="banner">
	    <ul>
	    	{volist name="banners" id="v"}
	        	<li><a href="{$v.link}" ><img src="{$v.src}" ></a></li>
	        {/volist}
	    </ul>
	</div>

	<div class="layui-main">
		<div class="article">
			<div class="notice">
				<table class="table article-table">
				    <thead>
				        <tr>
				            <th class="left size">最新公告</th>
				            <th>发布时间</th>
				        </tr>
				    </thead>
				    <tbody>
				    	{if isset($articles[1])}
					    	{volist name="articles[1]" id="v"}
						        <tr>
						            <td class="left">
						            	<p class="hide">
						            		<a href="{:url('index/article/details',['id'=>$v['id']])}" title="{$v.title}">{$v.title}</a>
						            	</p>
						            </td>
						            <td>{:date('Y-m-d',$v['update_time'])}</td>
						        </tr>
					        {/volist}
					    {/if}
				    </tbody>
				</table>
			</div>
			<div class="help">
				<table class="table article-table">
				    <thead>
				        <tr>
				            <th class="left size">帮助中心</th>
				            <th>发布时间</th>
				        </tr>
				    </thead>
				    <tbody>
				    	{if isset($articles[5])}
					        {volist name="articles[5]" id="v"}
						        <tr>
						            <td class="left">
						            	<p class="hide">
						            		<a href="{:url('index/article/details',['id'=>$v['id'],'index'=>7])}" title="{$v.title}">{$v.title}</a>
						            	</p>
						            </td>
						            <td>{:date('m-d H:i',$v['update_time'])}</td>
						        </tr>
					        {/volist}
				        {/if}
				    </tbody>
				</table>
			</div>
			<div class="issue">
				<table class="table article-table">
				    <thead>
				        <tr>
				            <th class="left size">常见问题</th>
				            <th>发布时间</th>
				        </tr>
				    </thead>
				    <tbody>
				    	{if isset($articles[4])}
					        {volist name="articles[4]" id="v"}
						        <tr>
						            <td class="left">
						            	<p class="hide">
						            		<a href="{:url('index/article/details',['id'=>$v['id'],'index'=>6])}" title="{$v.title}">{$v.title}</a>
						            	</p>
						            </td>
						            <td>{:date('m-d H:i',$v['update_time'])}</td>
						        </tr>
					        {/volist}
				        {/if}
				    </tbody>
				</table>
			</div>
		</div>
	</div>
{/block}

{block name="script"}
	<script src="__STATIC__/{$theme}/js/terseBanner.min.js"></script>
	<script type="text/javascript">
		$(document).ready(function($) {
			$('.banner').terseBanner({
				adaptive: true,
				arrow: true
			});
		});
	</script>
{/block}